/* 深色主题配色方案 */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-color: #1e88e5;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 返回按钮样式 */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
}

/* 排行榜主体样式 */
.leaderboard-container {
    max-width: 1200px;
    margin: 80px auto 60px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

/* 排序控制区域 */
.sort-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
}

.sort-options {
    display: flex;
    gap: 15px;
}

.sort-btn {
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-btn.active {
    background-color: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    font-weight: bold;
}

.sort-btn:hover:not(.active) {
    background-color: rgba(187, 134, 252, 0.1);
    color: var(--text-primary);
}

.page-size-select {
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* 排行榜表格样式 */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
}

.ranking-table th {
    background-color: var(--bg-tertiary);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.ranking-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.ranking-table tr:hover {
    background-color: rgba(187, 134, 252, 0.05);
}

.ranking-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.ranking-table tr:nth-child(even):hover {
    background-color: rgba(187, 134, 252, 0.08);
}

.rank-cell {
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.top-3 {
    color: var(--accent-color);
}

.avatar-cell {
    width: 60px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

/* 分页控件样式 */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.pagination-buttons {
    display: flex;
    gap: 10px;
}

.page-btn {
    padding: 8px 15px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 版权声明样式 */
.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.error {
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
}